package com.shuo.limit.annotation;

import com.shuo.limit.enums.LimitType;

import java.lang.annotation.*;

/**
 * Created by shuoGG on 2018/9/29 0029
 */
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
public @interface RateLimitToken {
    LimitType type() default LimitType.ALL;

    /**
     * 桶上限
     */
    long maxBurst() default 60;

    /**
     * 每秒产生的令牌数
     */
    float rate() default 5f;

}

